package com.pro.exam.web.model;

import java.util.HashMap;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;

public class TransDictPojo {
    private Integer id;

    private String ch;

    private Map<String, String> translates;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCh() {
        return ch;
    }

    public void setCh(String ch) {
        this.ch = ch == null ? null : ch.trim();
    }
    
    public Map<String, String> getTranslates() {
		if(translates==null || translates.isEmpty()){
			translates = new HashMap<String,String>();
		}
		return translates;
	}

	public void setTranslates(String translates) {
		JSONObject jasonObject = JSONObject.parseObject(translates);
		Map<String,String> map = (Map)jasonObject;
		this.translates = map;
	}
}